<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
                    <li class="active"><a href="{:U('Zhuhu/zhuhulist')}">住户列表</a></li>
                    <li><a href="{:U('Zhuhu/zhuhuadd')}">住户迁入</a></li>
		</ul>
            <form class="well form-search" method="get">
                    <label for="">小区：</label>
                    <select name="xiaoquid" class="select_2" id="xq">
                        <option value="">---选择小区---</option>
                    </select> &nbsp;&nbsp;
                    <label for="">楼宇：</label>
                    <select name="buildingid" class="select_2" id="building">
                        <option value="">---选择楼宇---</option>
                    </select> &nbsp; &nbsp;
                    <label for="">单元：</label>
                    <select name="unitid" class="select_2" id="unitnum">
                        <option value="">---选择单元---</option>
                    </select> &nbsp; &nbsp;
                    <label for="">住户身份：</label>
                    <select name="identity" class="select_2" id="unitnum">
                        <option value="">---请选择---</option>
                        <option value="6">未迁入</option>
                        <option value="1">业主本人</option>
                        <option value="2">亲属</option>
                        <option value="3">租客</option>
                        <option value="4">其他</option>
                        <option value="5">已迁出</option>
                    </select>
                    <label for="">关键字：</label>
                    <input type="text" name="keyword" style="width: 200px;" value="" placeholder="姓名/房号/电话/业主卡号"> &nbsp; &nbsp; &nbsp; &nbsp;
                    <input type="submit" class="btn btn-primary" value="搜索">
            </form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
                                            <th>
                                                <label class="checkbox checkbox-inline">
                                                    <input type="checkbox" value="" id="SelectAll" onclick="selectAll();">
                                                    <i class="input-helper"></i>
                                                </label>
                                            </th>
                                            <th>姓名</th>
                                            <th>小区</th>
                                            <th>楼宇</th>
                                            <th>单元</th>
                                            <th>房号</th>
                                            <th>手机</th>
                                            <th>住户身份</th>
                                            <th>操作</th>
						
					</tr>
				</thead>
				<tbody>
					<foreach name="info" item="vo">
					<tr>
                                            <td>
                                                <label class="checkbox checkbox-inline">
                                                    <input type="checkbox" value="{$vo.id}" id="subcheck" onclick="setSelectAll();">
                                                    <i class="input-helper"></i>
                                                </label>
                                            </td>
						<td>{$vo.name}</td>
						<td>{$vo.xiaoqu}</td>
						<td>{$vo.louyu}</td>
						<td>{$vo.danyuan}</td>
						<td>{$vo.fanghao}</td>
						<td>{$vo.zhphone}</td>
                                                <td>{$vo.zhshenfen}</td>
                                                <td>
                                                    <a href="{:U('Zhuhu/zhuhuupdata',array('id'=>$vo['id']))}">修改</a>&nbsp;|&nbsp;
                                                    <a class='js-ajax-delete' href="{:U('Zhuhu/delete',array('id'=>$vo['id']))}">删除</a>
                                                </td>
						
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
        <script type="text/javascript">
            //复选框事件  
            //全选、取消全选的事件  
            function selectAll(){  
                if ($("#SelectAll").attr("checked")) {  
                    $(":checkbox").attr("checked", true);  
                } else {  
                    $(":checkbox").attr("checked", false);  
                }  
            }  
            //子复选框的事件  
            function setSelectAll(){  
                //当没有选中某个子复选框时，SelectAll取消选中  
                if (!$("#subcheck").checked) {  
                    $("#SelectAll").attr("checked", false);  
                }  
                var chsub = $("input[type='checkbox'][id='subcheck']").length; //获取subcheck的个数  
                var checkedsub = $("input[type='checkbox'][id='subcheck']:checked").length; //获取选中的subcheck的个数  
                if (checkedsub == chsub) {  
                    $("#SelectAll").attr("checked", true);  
                }  
            }  
        </script>
</body>
</html>